<?php
	require 'common.php';
	require 'lib.php';
	
	$username = $_COOKIE['username'];
	$userid = $_COOKIE['userid'];

	$redis = connect_redis();
	$follow_count = $redis->sCard("follows:userid".$userid);	// 我的关注总数
	$fans_count = $redis->sCard("fans:userid".$userid);			// 我粉丝总数
?>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf8"/>
		<title>微博主页</title>
		<style>
			*{padding:0;margin:0;}
			#contrainer {
				width: 980px;
				margin:0 auto;
				padding: 12px 15px;
			}
			header ul li{
				float: left;
				list-style: none;
				margin:0 20px 0 0;
				padding:6px 10px 6px 0;
			}

			#content {
				clear:both;
				margin-top: 50px;
			}
		</style>
	</head>
	<body>
		<div id="contrainer">
			<header>
				<ul>
					<li>你好, <?php echo $username ?></li>
					<li><a href="index.php">主页</a></li>
					<li><a href="circle.php">圈子</a></li>
					<li><a href="action.php?type=layout">退出</a></li>
					<li style="margin-left: 40px;margin-right:5px">关注<?php echo $follow_count ?></li>
					<li>粉丝<?php echo $fans_count ?></li>
				</ul>
			</header>